POV-Ray : Newsgroups : povray.animations : How to animate sub-region only : Re: How to animate sub-region only Server Time
27 Apr 2024 18:30:05 EDT (-0400)
  Re: How to animate sub-region only  
From: sumdumguy
Date: 22 Nov 2008 05:20:01
Message: <web.4927dbb3efcfba633b34ecfe0@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:
> "sumdumguy" <nomail@nomail> wrote in message
> news:web.4927c762fb7773f43b34ecfe0@news.povray.org...
> >I have a scene where only a small part gets changed frame to frame so I
> >want to
> > render the first frame fully and then the following frames only for a
> > selection
> > of rows and columns, automatically keeping the rest of the pixel values
> > unchanged from first frame. How do I do this?
>
> I don't think there's a straightforward way of doing this. If your desire to
> do this is to save render time you may well find you expend more time
> developing a technique to glue all the bits together than you save when
> rendering. However, if you're driven by some other motive then there are a
> variety of approaches that spring to mind (all of which involve some
> external post-processing).
>
> You don't say whether each of the subsequent frames would be an identical
> selection of rows and columns. If you want different rows and columns in
> each frame then you'd need to invoke POV-Ray from the command-line (e.g from
> a script) with different command-line options for each frame. Otherwise you
> could use one POV-Ray render for the first frame and an animation sequence
> (e.g. +kfi1 +kff100) to generate all the other frames.
>
> There are partial animation command-line options, which may be of value to
> you (see +sc in the help). If the rows and columns you want to render from
> frame 2 are centred on the middle of frame 1, then you may find it easier to
> adjust the width and height (+w +h) and compensate using the up and right
> camera vectors (or the angle attribute), because then you don't have the
> post-processing effort required to isolate the rendered sections from the
> rest of the images.
>
> Assembling the images into a single animation is always done outside of
> POV-Ray using whichever tool serves you best. The technique you develop
> would need to correspond with the capabilities of the utility you plan to
> use and the format you wish to generate. For example, the GIF constructor
> set (to build animated GIFs) allows you to retain a previous image and
> overlay a new partial image at a particular location, so this would probably
> lend itself to the technique of adjusting the width and height with the up
> and right vectors.
>
> Regards,
> Chris B.

My goal is indeed to save time.
Here is why +sc option is no good for me. If I use +sc options, the resulting
image will have the pixels I want and black pixels elsewhere. So far so good.
But the location of the "good" pixels within the total image will be different
from where they are in the first frame.
Suppose I have a 1280x1024 image and I want to render row 2 through 5 and
columns 2 through 5. Just a tiny patch. This will render fine and produce a
mostly black image whose size is 1280x1024. But the non-black patch will not be
between columns 2 and 5 and rows 2 and 5. It will be starting at row 1 and it
seems to be centered columnwise. So I cannot just use software to map black
pixels to 100% transparency and then paste the new image on top of frame 1.

The real problem is that for large images with tons of isosurfaces and
anti-aliasing, the speed per frame is ~2 hours on my computer. If I can animate
1/1000th of the image that changes, I can save days (actually weeks) of
rendering.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.